package com.mall.mymall.dao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class Stores {
    // 主键字段，自增
    @TableId(value = "store_id", type = IdType.AUTO)
    private Integer storeId;

    // 店铺名称
    private String storeName;

    // 店铺地址
    private String storeAddress;

    // 店铺状态
    private String storeStatus;

    // 组织ID
    private String organizationId;

    // 创建时间，插入时自动填充
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createTime;

    // 类型
    private String type;

}
